﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SiteUnity.Layers.Entity.PageItems.Files;
using SiteUnity.Layers.Entity.General;

namespace SiteUnity.Frame.Modules.Gallery.Slider
{
    public class SliderItem : File
    {
        public string PageUrl { get; set; }

        public SliderItem() { }

        public SliderItem(File file)
        {
            setProperties(file, string.Empty);
        }

        public SliderItem(File file, string pageUrl)
        {
            setProperties(file, pageUrl);
        }

        private void setProperties(File file, string pageUrl)
        {
            this.Description = file.Description;
            this.Guid = file.Guid;
            this.IsPublic = file.IsPublic;
            this.PageGuid = file.PageGuid;
            this.pageItemTypeID = file.pageItemTypeID;
            this.Size = file.Size;
            this.Title = file.Title;
            this.TypeID = file.TypeID;
            this.Url = file.Url;

            this.PageUrl = pageUrl;
        }
    }
}
